Dynomotion

Group: DynoMotion Message: 9960 From: scott.littlecnc Date: 8/13/2014
Subject: KStep Setup

I am new to the Kflop / KStep, been spending a lot of time reading through the documentation and am a bit overwhelmed. I am making a basic 3 axis router with the KStep, and would like to know if anyone has done a setup description for this? 

I have already set up the Kflop according to the KStep manual instructions. It would be extremely helpful to have a step by step through the whole process. Perhaps someone could reference a thread where this has already been done? This in combination with the manual could save a lot of time.

Thanks!

Group: DynoMotion Message: 9963 From: Tom Kerekes Date: 8/13/2014
Subject: Re: KStep Setup
Hi Scott,

KFLOP+KSTEP is the closest thing we have to Plug and Play :)

To get motion all you should need to do is:

#1 - Wire your Motor Supply and Motor to KSTEP see:

#2 - On the KMotion | Config Screen | Load Channel | KStepAxis0.mot

#3 - On the KMotion | Step Response Screen | Push "Move"

Have you gotten that far?  Does your Motor move?

You might see:

There is also an example Initialization C Program called:

\C Programs\KStep\InitKStep3Axis.c

To help understand the various ways KFLOP can be configured see:

HTH
Regards
TK



From: "scott.littlecnc@... [DynoMotion]" <DynoMotion@yahoogroups.com>
To: DynoMotion@yahoogroups.com
Sent: Wednesday, August 13, 2014 8:13 AM
Subject: [DynoMotion] KStep Setup

 
I am new to the Kflop / KStep, been spending a lot of time reading through the documentation and am a bit overwhelmed. I am making a basic 3 axis router with the KStep, and would like to know if anyone has done a setup description for this? 
I have already set up the Kflop according to the KStep manual instructions. It would be extremely helpful to have a step by step through the whole process. Perhaps someone could reference a thread where this has already been done? This in combination with the manual could save a lot of time.
Thanks!


Group: DynoMotion Message: 9967 From: scott.littlecnc Date: 8/14/2014
Subject: Re: KStep Setup
Thanks Tom! I am working on getting this set up. Is there a wiring diagram for the E-Stop circuit? Would I be right in assuming that it would use the "Enable" pin on the KStep J6 connector? Or is it better to do this through the Kflop board?
Group: DynoMotion Message: 9970 From: Tom Kerekes Date: 8/14/2014
Subject: Re: KStep Setup
Hi Scott,

There are many ways to do EStop that is up to you.  I'm hesitant to to make any specific recommendations.

The enable pin is connected to KFLOP IO45 on JP7 and is normally used in software to enable/disable the KSTEP motor currents.  You have the option to not enable IO45 and override enable with an external signal like you describe.

Other options are to have your EStop switch off the Motor Supply.

Or feed the EStop into an input to KFLOP (ie KSTEP 24V Opto inputs) and have a "watchdog" type of program running in KFLOP to detect EStop and handle it as you wish (disable KSTEP, Disable axes, apply brakes, etc...) - but this involves software in KFLOP which may be less reliable.

HTH
Regards
TK 

Group: DynoMotion Message: 9974 From: Moray Cuthill Date: 8/15/2014
Subject: Re: KStep Setup
Hi,
 
since Tom would rather not comment on possible e-stop options, I'll mention how I implemented one on a small machine last week using a KStep.
 
I used a double pole relay, controlled via the E-Stop button(s) circuit, which is a NC (Normally Closed) type setup. This way, the circuit is as fail safe as possible, as any breakage of the circuit will prevent the system from exiting an E-stop state.
One set of contacts in the relay is used to control the main power supply for the stepper motors, and the other set I connected to one of the KStep Opto Ins. This way, the KFlop is notified an E-stop has occured, and regardless of what the KFlop is programmed to do about the E-stop, power is removed to the motors.
 
My reasoning for this, is an E-stop should never rely on software. When programmed correctly, in an ideal world, the KFlop should always respond how you want it to an E-stop, however glitchs in software/hardware can happen, so by removing power, you guarantee things will stop.
Tthere are applications where removing power is the last thing you want to do, however I doubt that will apply to anything being driven by a KStep!
 
I also have a lathe using a KFlop+Kanalog, which has a more advanced E-stop setup, however it still ultimately removes the power to the servo and spindle drives.
 
Moray


On Thu, Aug 14, 2014 at 9:59 PM, Tom Kerekes tk@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

Hi Scott,

There are many ways to do EStop that is up to you.  I'm hesitant to to make any specific recommendations.

The enable pin is connected to KFLOP IO45 on JP7 and is normally used in software to enable/disable the KSTEP motor currents.  You have the option to not enable IO45 and override enable with an external signal like you describe.

Other options are to have your EStop switch off the Motor Supply.

Or feed the EStop into an input to KFLOP (ie KSTEP 24V Opto inputs) and have a "watchdog" type of program running in KFLOP to detect EStop and handle it as you wish (disable KSTEP, Disable axes, apply brakes, etc...) - but this involves software in KFLOP which may be less reliable.

HTH
Regards
TK 

Group: DynoMotion Message: 9977 From: Jack Gizienski Date: 8/15/2014
Subject: Re: KStep Setup

Moray,

I am also interested in adding an E-stop to my router and read your post with great interest.  I was originally looking at doing the stop through my Kflop but you raise a very good point about Murphy’s Law.  However, I’m not sure that removing power to the drivers is the right approach either.  It may depend on what kind of drivers you are using but the Gecko manual specifically says:

 

CAUTION! Never put a switch on the DC side of the power supply! This will damage, if not destroy, your drive.”

 

This may not apply to all drivers but I think I toasted a China driver this week doing just that.  It might be better to connect the second set of contacts to the enable/disable (again depending on what kind of driver you have) on the driver to avoid causing any damage.  What are your thoughts?

 

Would you be willing to post your C code that monitors the E-stop and flags the Kflop?

 

Jack

 

 

From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com]
Sent: Friday, August 15, 2014 1:55 PM
To: DynoMotion@yahoogroups.com
Subject: Re: [DynoMotion] Re: KStep Setup

 

 

Hi,

 

since Tom would rather not comment on possible e-stop options, I'll mention how I implemented one on a small machine last week using a KStep.

 

I used a double pole relay, controlled via the E-Stop button(s) circuit, which is a NC (Normally Closed) type setup. This way, the circuit is as fail safe as possible, as any breakage of the circuit will prevent the system from exiting an E-stop state.

One set of contacts in the relay is used to control the main power supply for the stepper motors, and the other set I connected to one of the KStep Opto Ins. This way, the KFlop is notified an E-stop has occured, and regardless of what the KFlop is programmed to do about the E-stop, power is removed to the motors.

 

My reasoning for this, is an E-stop should never rely on software. When programmed correctly, in an ideal world, the KFlop should always respond how you want it to an E-stop, however glitchs in software/hardware can happen, so by removing power, you guarantee things will stop.

Tthere are applications where removing power is the last thing you want to do, however I doubt that will apply to anything being driven by a KStep!

 

I also have a lathe using a KFlop+Kanalog, which has a more advanced E-stop setup, however it still ultimately removes the power to the servo and spindle drives.

 

Moray

 

On Thu, Aug 14, 2014 at 9:59 PM, Tom Kerekes tk@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:

 

Hi Scott,

 

There are many ways to do EStop that is up to you.  I'm hesitant to to make any specific recommendations.

 

The enable pin is connected to KFLOP IO45 on JP7 and is normally used in software to enable/disable the KSTEP motor currents.  You have the option to not enable IO45 and override enable with an external signal like you describe.

 

Other options are to have your EStop switch off the Motor Supply.

 

Or feed the EStop into an input to KFLOP (ie KSTEP 24V Opto inputs) and have a "watchdog" type of program running in KFLOP to detect EStop and handle it as you wish (disable KSTEP, Disable axes, apply brakes, etc...) - but this involves software in KFLOP which may be less reliable.

 

HTH

Regards

TK 

 


Sent: Thursday, August 14, 2014 12:39 PM
Subject: [DynoMotion] Re: KStep Setup

 

 

Thanks Tom! I am working on getting this set up. Is there a wiring diagram for the E-Stop circuit? Would I be right in assuming that it would use the "Enable" pin on the KStep J6 connector? Or is it better to do this through the Kflop board?

 

 

Group: DynoMotion Message: 9978 From: ricochetproducts Date: 8/15/2014
Subject: Re: KStep Setup
Hi Jack,  I used a the same set up as Moray.  I break the In coming  (line side) of the power supply.  I have had no problems with this setup.
I too believe that you need a hard stop and not a software stop.
Steve
Group: DynoMotion Message: 9980 From: Jack Gizienski Date: 8/15/2014
Subject: Re: KStep Setup

Steve,

What are your thoughts on using the disable/enable input?

Jack

 

From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com]
Sent: Friday, August 15, 2014 2:37 PM
To: DynoMotion@yahoogroups.com
Subject: RE: [DynoMotion] Re: KStep Setup

 

 

Hi Jack,  I used a the same set up as Moray.  I break the In coming  (line side) of the power supply.  I have had no problems with this setup.

I too believe that you need a hard stop and not a software stop.

Steve

Group: DynoMotion Message: 9981 From: Steve Klemp Date: 8/15/2014
Subject: Re: KStep Setup
I still have the the input and it works but for (personal) safety I want a hardware stop

#define ESTOP 1046


// Handle ESTOP
result = Debounce(ReadBit(ESTOP),&ecount,&elast,&elastsolid);
if  (result == 1)
{
DoPC(PC_COMM_ESTOP);
 
.....Steve
            
 


On Friday, August 15, 2014 1:48 PM, "'Jack Gizienski' jackgiz@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Steve,
What are your thoughts on using the disable/enable input?
Jack
 
From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com]
Sent: Friday, August 15, 2014 2:37 PM
To: DynoMotion@yahoogroups.com
Subject: RE: [DynoMotion] Re: KStep Setup
 
 
Hi Jack,  I used a the same set up as Moray.  I break the In coming  (line side) of the power supply.  I have had no problems with this setup.
I too believe that you need a hard stop and not a software stop.
Steve


Group: DynoMotion Message: 9982 From: Moray Cuthill Date: 8/15/2014
Subject: Re: KStep Setup
Jack,
 
I should of maybe been a bit clearer in my description, but by removing power I disconnect the 240Vac input to the power supply, as is normally recommended, not cutting the DC feed direct to the KStep (I'm using a basic linear supply for reference).
 
The KStep machine I built is controlled directly from Mach3, so I never bothered adding anything to do with the E-Stop to the init.c file. I'm using the basic KStep 3axis example provided, with only the motor/channel tuning altered to suit the machine.
I'll admit I probably should have something to monitor the E-stop, however this machine was built in a tight time frame to get a job done, and since it's not exactly going to cause any serious injuries unless I'm really stupid, I did skip over a few aspects of it.
Once I get back home (I'm currently sitting in France on holiday!), I'll finish up the machine and add a couple lines to the init.c file.
 
Those lines will probably be something like-
 
at the top, define a name for the relevant input:
// INPUTS
#define ESTOP 169   // OptoIn 1  - low when in e-stop
 
then within the main forever loop:
// E-STOP STUFF
if(!ESTOP){    // If estop bit is not active, then we're in an E-Stop state
    ClearBit(45)      // so disable the drives
}
 
 
For reference, I've got a built thread for this machine over on the machsupport forums at - http://www.machsupport.com/forum/index.php/topic,27732.0.html
As you'll see, it's sole purpose in life is for probing parts with pretty weak steppers, hence my lax implementation of an E-stop. If it was cutting, or had more powerful motors, I would be a lot more thorough with my implementation.
 
Moray


On Fri, Aug 15, 2014 at 7:30 PM, 'Jack Gizienski' jackgiz@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

Moray,

I am also interested in adding an E-stop to my router and read your post with great interest.  I was originally looking at doing the stop through my Kflop but you raise a very good point about Murphy’s Law.  However, I’m not sure that removing power to the drivers is the right approach either.  It may depend on what kind of drivers you are using but the Gecko manual specifically says:

 

CAUTION! Never put a switch on the DC side of the power supply! This will damage, if not destroy, your drive.”

 

This may not apply to all drivers but I think I toasted a China driver this week doing just that.  It might be better to connect the second set of contacts to the enable/disable (again depending on what kind of driver you have) on the driver to avoid causing any damage.  What are your thoughts?

 

Would you be willing to post your C code that monitors the E-stop and flags the Kflop?

 

Jack

 

 

From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com]
Sent: Friday, August 15, 2014 1:55 PM
To: DynoMotion@yahoogroups.com
Subject: Re: [DynoMotion] Re: KStep Setup

 

 

Hi,

 

since Tom would rather not comment on possible e-stop options, I'll mention how I implemented one on a small machine last week using a KStep.

 

I used a double pole relay, controlled via the E-Stop button(s) circuit, which is a NC (Normally Closed) type setup. This way, the circuit is as fail safe as possible, as any breakage of the circuit will prevent the system from exiting an E-stop state.

One set of contacts in the relay is used to control the main power supply for the stepper motors, and the other set I connected to one of the KStep Opto Ins. This way, the KFlop is notified an E-stop has occured, and regardless of what the KFlop is programmed to do about the E-stop, power is removed to the motors.

 

My reasoning for this, is an E-stop should never rely on software. When programmed correctly, in an ideal world, the KFlop should always respond how you want it to an E-stop, however glitchs in software/hardware can happen, so by removing power, you guarantee things will stop.

Tthere are applications where removing power is the last thing you want to do, however I doubt that will apply to anything being driven by a KStep!

 

I also have a lathe using a KFlop+Kanalog, which has a more advanced E-stop setup, however it still ultimately removes the power to the servo and spindle drives.

 

Moray

 

On Thu, Aug 14, 2014 at 9:59 PM, Tom Kerekes tk@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:

 

Hi Scott,

 

There are many ways to do EStop that is up to you.  I'm hesitant to to make any specific recommendations.

 

The enable pin is connected to KFLOP IO45 on JP7 and is normally used in software to enable/disable the KSTEP motor currents.  You have the option to not enable IO45 and override enable with an external signal like you describe.

 

Other options are to have your EStop switch off the Motor Supply.

 

Or feed the EStop into an input to KFLOP (ie KSTEP 24V Opto inputs) and have a "watchdog" type of program running in KFLOP to detect EStop and handle it as you wish (disable KSTEP, Disable axes, apply brakes, etc...) - but this involves software in KFLOP which may be less reliable.

 

HTH

Regards

TK 

 


Sent: Thursday, August 14, 2014 12:39 PM
Subject: [DynoMotion] Re: KStep Setup

 

 

Thanks Tom! I am working on getting this set up. Is there a wiring diagram for the E-Stop circuit? Would I be right in assuming that it would use the "Enable" pin on the KStep J6 connector? Or is it better to do this through the Kflop board?

 

 


Group: DynoMotion Message: 9983 From: Moray Cuthill Date: 8/15/2014
Subject: Re: KStep Setup
Personally, I never debounce any inputs that should be continuous. To me debounce should only be used to avoid detecting multiple presses for buttons where you really don't want to see multple presses/bounces when activated i.e. operator push buttons.
 
Things like e-stop switches that should never be activated, switch bounce should never cause any problem, as even if it bounces and causes a few pulses before settling, something should of been done about it on the first bounce.
 
Moray


On Fri, Aug 15, 2014 at 7:56 PM, Steve Klemp steveklemp@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

I still have the the input and it works but for (personal) safety I want a hardware stop

#define ESTOP 1046


// Handle ESTOP
result = Debounce(ReadBit(ESTOP),&ecount,&elast,&elastsolid);
if  (result == 1)
{
DoPC(PC_COMM_ESTOP);
 
.....Steve
            
 


On Friday, August 15, 2014 1:48 PM, "'Jack Gizienski' jackgiz@... [DynoMotion]" <DynoMotion@yahoogroups.com> wrote:


 
Steve,
What are your thoughts on using the disable/enable input?
Jack
 
From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com]
Sent: Friday, August 15, 2014 2:37 PM
To: DynoMotion@yahoogroups.com
Subject: RE: [DynoMotion] Re: KStep Setup
 
 
Hi Jack,  I used a the same set up as Moray.  I break the In coming  (line side) of the power supply.  I have had no problems with this setup.
I too believe that you need a hard stop and not a software stop.
Steve



Group: DynoMotion Message: 9984 From: Russ Larson Date: 8/15/2014
Subject: Re: KStep Setup

Jack,

 

You are correct this totally depends on your drivers.  It is actual safer to disable the driver instead of power the driver down.  On the Gecko they have two pins that need to be short to enable the drive.  Using the relay to close or open those connections is much safer to disable the driver.   This is also true on servo amplifiers from Yaskawa, Panasonic, Mitsubishi, Omron, etc.  The servo drivers usually have a pin in the control connector that is called "Servo On" that needs to be pulled high or low depending on the drive to enable any movement.

 

 

Russ

 

 

From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com]
Sent: Friday, August 15, 2014 2:30 PM
To: DynoMotion@yahoogroups.com
Subject: RE: [DynoMotion] Re: KStep Setup

 

 

Moray,

I am also interested in adding an E-stop to my router and read your post with great interest.  I was originally looking at doing the stop through my Kflop but you raise a very good point about Murphy’s Law.  However, I’m not sure that removing power to the drivers is the right approach either.  It may depend on what kind of drivers you are using but the Gecko manual specifically says:

 

CAUTION! Never put a switch on the DC side of the power supply! This will damage, if not destroy, your drive.”

 

This may not apply to all drivers but I think I toasted a China driver this week doing just that.  It might be better to connect the second set of contacts to the enable/disable (again depending on what kind of driver you have) on the driver to avoid causing any damage.  What are your thoughts?

 

Would you be willing to post your C code that monitors the E-stop and flags the Kflop?

 

Jack

 

 

From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com]
Sent: Friday, August 15, 2014 1:55 PM
To: DynoMotion@yahoogroups.com
Subject: Re: [DynoMotion] Re: KStep Setup

 

 

Hi,

 

since Tom would rather not comment on possible e-stop options, I'll mention how I implemented one on a small machine last week using a KStep.

 

I used a double pole relay, controlled via the E-Stop button(s) circuit, which is a NC (Normally Closed) type setup. This way, the circuit is as fail safe as possible, as any breakage of the circuit will prevent the system from exiting an E-stop state.

One set of contacts in the relay is used to control the main power supply for the stepper motors, and the other set I connected to one of the KStep Opto Ins. This way, the KFlop is notified an E-stop has occured, and regardless of what the KFlop is programmed to do about the E-stop, power is removed to the motors.

 

My reasoning for this, is an E-stop should never rely on software. When programmed correctly, in an ideal world, the KFlop should always respond how you want it to an E-stop, however glitchs in software/hardware can happen, so by removing power, you guarantee things will stop.

Tthere are applications where removing power is the last thing you want to do, however I doubt that will apply to anything being driven by a KStep!

 

I also have a lathe using a KFlop+Kanalog, which has a more advanced E-stop setup, however it still ultimately removes the power to the servo and spindle drives.

 

Moray

 

On Thu, Aug 14, 2014 at 9:59 PM, Tom Kerekes tk@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:

 

Hi Scott,

 

There are many ways to do EStop that is up to you.  I'm hesitant to to make any specific recommendations.

 

The enable pin is connected to KFLOP IO45 on JP7 and is normally used in software to enable/disable the KSTEP motor currents.  You have the option to not enable IO45 and override enable with an external signal like you describe.

 

Other options are to have your EStop switch off the Motor Supply.

 

Or feed the EStop into an input to KFLOP (ie KSTEP 24V Opto inputs) and have a "watchdog" type of program running in KFLOP to detect EStop and handle it as you wish (disable KSTEP, Disable axes, apply brakes, etc...) - but this involves software in KFLOP which may be less reliable.

 

HTH

Regards

TK 

 


Sent: Thursday, August 14, 2014 12:39 PM
Subject: [DynoMotion] Re: KStep Setup

 

 

Thanks Tom! I am working on getting this set up. Is there a wiring diagram for the E-Stop circuit? Would I be right in assuming that it would use the "Enable" pin on the KStep J6 connector? Or is it better to do this through the Kflop board?

 

 

Group: DynoMotion Message: 9985 From: Moray Cuthill Date: 8/15/2014
Subject: Re: KStep Setup
I had assumed Jack was asking about a KStep, however even with other drives, killing the enable is not always the best option. You have to weigh up the pros and cons, of each method.
 
Looking at any drive with an enable, you have to consider what happens when you remove the enable. On stepper and servo drives it usually means the motor will freewheel to a stop, which for some systems could be the worst thing. Also, it can be beneficial to keep your E-stop and enable systems seperate.
 
I'll touch the tip of the iceberg for this.
 
By killing the power and notifying the controller, it gives the controller a chance to stop movement, and enough time for the drives to stop things before all power is lost. If you just kill the enable, the system still has power, which depending on why you want things to stop, could be undesirable.
 
Once you're into servo drives, things do get a lot more complicated. When deciding how to implement the servos on my lathe, one piece of advise I was given, was have the E-stop totally independant of the enable, as it keeps things simpler and makes fault finding easier i.e. you don't risk having software interfering with the E-stop circuit, and you don't have the E-stop circuit interfering with the enables. Which makes sense, as if you're in E-stop with the power removed, the enable signal is going to do nothing anyway.
My final implementation is the E-stop directly kills all power except the 5+24V logic supplies, drops out one of three relays which all have to be active to provide the axis servo drives with 24V to avoid a fast stop being triggered (the other 2 relays are powered by the servo drives only when they're not in fault, so a drive fault condition will also trigger a fast stop in the other drive), so the servo drives perform a fast stop, and at the same time the KFlop should monitor the E-stop and in response disable the enable and stop movement.
The big defiency in my setup is the spindle VFD, as I have no way of stopping it quickly, so have to rely on power being removed and KFlop disabling it. The only way I could remedy this is by buying a new VFD, that hasn't had a password set (there is no way to reset this VFD before anyone suggests it!), so I can change the settings and add it into the fault/fast stop circuit used by the servos.
Also, for full industrial use, the E-stop circuit should really use a proper safety relay designed for the purpose. They have force guided contacts, which means should contacts weld for any reason, other contacts should still disconnect, and a monitoring circuit will prevent the relay from being reactivated. You could also add in a time delay relay, which will maintain power to the servo drives for a brief period to ensure they have power to perform a controlled stop.
 
The exact legal requirements for E-Stop do vary between countries, so it's up to the person designing and implementing the system to decide how that is best acheived, but the ultimate goal is to stop the machine as quickly and safely as possible.
 
Moray


On Fri, Aug 15, 2014 at 8:28 PM, 'Russ Larson' rdlarson@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

Jack,

 

You are correct this totally depends on your drivers.  It is actual safer to disable the driver instead of power the driver down.  On the Gecko they have two pins that need to be short to enable the drive.  Using the relay to close or open those connections is much safer to disable the driver.   This is also true on servo amplifiers from Yaskawa, Panasonic, Mitsubishi, Omron, etc.  The servo drivers usually have a pin in the control connector that is called "Servo On" that needs to be pulled high or low depending on the drive to enable any movement.

 

 

Russ

 

 

From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com]
Sent: Friday, August 15, 2014 2:30 PM


To: DynoMotion@yahoogroups.com
Subject: RE: [DynoMotion] Re: KStep Setup

 

 

Moray,

I am also interested in adding an E-stop to my router and read your post with great interest.  I was originally looking at doing the stop through my Kflop but you raise a very good point about Murphy’s Law.  However, I’m not sure that removing power to the drivers is the right approach either.  It may depend on what kind of drivers you are using but the Gecko manual specifically says:

 

CAUTION! Never put a switch on the DC side of the power supply! This will damage, if not destroy, your drive.”

 

This may not apply to all drivers but I think I toasted a China driver this week doing just that.  It might be better to connect the second set of contacts to the enable/disable (again depending on what kind of driver you have) on the driver to avoid causing any damage.  What are your thoughts?

 

Would you be willing to post your C code that monitors the E-stop and flags the Kflop?

 

Jack

 

 

From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com]
Sent: Friday, August 15, 2014 1:55 PM
To: DynoMotion@yahoogroups.com
Subject: Re: [DynoMotion] Re: KStep Setup

 

 

Hi,

 

since Tom would rather not comment on possible e-stop options, I'll mention how I implemented one on a small machine last week using a KStep.

 

I used a double pole relay, controlled via the E-Stop button(s) circuit, which is a NC (Normally Closed) type setup. This way, the circuit is as fail safe as possible, as any breakage of the circuit will prevent the system from exiting an E-stop state.

One set of contacts in the relay is used to control the main power supply for the stepper motors, and the other set I connected to one of the KStep Opto Ins. This way, the KFlop is notified an E-stop has occured, and regardless of what the KFlop is programmed to do about the E-stop, power is removed to the motors.

 

My reasoning for this, is an E-stop should never rely on software. When programmed correctly, in an ideal world, the KFlop should always respond how you want it to an E-stop, however glitchs in software/hardware can happen, so by removing power, you guarantee things will stop.

Tthere are applications where removing power is the last thing you want to do, however I doubt that will apply to anything being driven by a KStep!

 

I also have a lathe using a KFlop+Kanalog, which has a more advanced E-stop setup, however it still ultimately removes the power to the servo and spindle drives.

 

Moray

 

On Thu, Aug 14, 2014 at 9:59 PM, Tom Kerekes tk@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:

 

Hi Scott,

 

There are many ways to do EStop that is up to you.  I'm hesitant to to make any specific recommendations.

 

The enable pin is connected to KFLOP IO45 on JP7 and is normally used in software to enable/disable the KSTEP motor currents.  You have the option to not enable IO45 and override enable with an external signal like you describe.

 

Other options are to have your EStop switch off the Motor Supply.

 

Or feed the EStop into an input to KFLOP (ie KSTEP 24V Opto inputs) and have a "watchdog" type of program running in KFLOP to detect EStop and handle it as you wish (disable KSTEP, Disable axes, apply brakes, etc...) - but this involves software in KFLOP which may be less reliable.

 

HTH

Regards

TK 

 


Sent: Thursday, August 14, 2014 12:39 PM
Subject: [DynoMotion] Re: KStep Setup

 

 

Thanks Tom! I am working on getting this set up. Is there a wiring diagram for the E-Stop circuit? Would I be right in assuming that it would use the "Enable" pin on the KStep J6 connector? Or is it better to do this through the Kflop board?

 

 


Group: DynoMotion Message: 9986 From: Jack Gizienski Date: 8/15/2014
Subject: Re: KStep Setup

Sorry to stir the pot on this but I think this has been a good debate.  Unfortunately, like most things in life the final answer comes down to “it depends”.  It depends on your machine, what you are trying to protect against, and how deep your pockets are.  Looks like I need run a couple of tests to see what stops faster, killing power or doing a disable.  Thanks for all the input.

 

Jack

 

PS Moray, go enjoy your holiday.  What are you doing sending all these emails???

 

From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com]
Sent: Friday, August 15, 2014 5:25 PM
To: DynoMotion@yahoogroups.com
Subject: Re: [DynoMotion] Re: KStep Setup

 

 

I had assumed Jack was asking about a KStep, however even with other drives, killing the enable is not always the best option. You have to weigh up the pros and cons, of each method.

 

Looking at any drive with an enable, you have to consider what happens when you remove the enable. On stepper and servo drives it usually means the motor will freewheel to a stop, which for some systems could be the worst thing. Also, it can be beneficial to keep your E-stop and enable systems seperate.

 

I'll touch the tip of the iceberg for this.

 

By killing the power and notifying the controller, it gives the controller a chance to stop movement, and enough time for the drives to stop things before all power is lost. If you just kill the enable, the system still has power, which depending on why you want things to stop, could be undesirable.

 

Once you're into servo drives, things do get a lot more complicated. When deciding how to implement the servos on my lathe, one piece of advise I was given, was have the E-stop totally independant of the enable, as it keeps things simpler and makes fault finding easier i.e. you don't risk having software interfering with the E-stop circuit, and you don't have the E-stop circuit interfering with the enables. Which makes sense, as if you're in E-stop with the power removed, the enable signal is going to do nothing anyway.

My final implementation is the E-stop directly kills all power except the 5+24V logic supplies, drops out one of three relays which all have to be active to provide the axis servo drives with 24V to avoid a fast stop being triggered (the other 2 relays are powered by the servo drives only when they're not in fault, so a drive fault condition will also trigger a fast stop in the other drive), so the servo drives perform a fast stop, and at the same time the KFlop should monitor the E-stop and in response disable the enable and stop movement.

The big defiency in my setup is the spindle VFD, as I have no way of stopping it quickly, so have to rely on power being removed and KFlop disabling it. The only way I could remedy this is by buying a new VFD, that hasn't had a password set (there is no way to reset this VFD before anyone suggests it!), so I can change the settings and add it into the fault/fast stop circuit used by the servos.

Also, for full industrial use, the E-stop circuit should really use a proper safety relay designed for the purpose. They have force guided contacts, which means should contacts weld for any reason, other contacts should still disconnect, and a monitoring circuit will prevent the relay from being reactivated. You could also add in a time delay relay, which will maintain power to the servo drives for a brief period to ensure they have power to perform a controlled stop.

 

The exact legal requirements for E-Stop do vary between countries, so it's up to the person designing and implementing the system to decide how that is best acheived, but the ultimate goal is to stop the machine as quickly and safely as possible.

 

Moray

 

On Fri, Aug 15, 2014 at 8:28 PM, 'Russ Larson' rdlarson@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:

 

Jack,

 

You are correct this totally depends on your drivers.  It is actual safer to disable the driver instead of power the driver down.  On the Gecko they have two pins that need to be short to enable the drive.  Using the relay to close or open those connections is much safer to disable the driver.   This is also true on servo amplifiers from Yaskawa, Panasonic, Mitsubishi, Omron, etc.  The servo drivers usually have a pin in the control connector that is called "Servo On" that needs to be pulled high or low depending on the drive to enable any movement.

 

 

Russ

 

 

From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com]
Sent: Friday, August 15, 2014 2:30 PM


To: DynoMotion@yahoogroups.com
Subject: RE: [DynoMotion] Re: KStep Setup

 

 

Moray,

I am also interested in adding an E-stop to my router and read your post with great interest.  I was originally looking at doing the stop through my Kflop but you raise a very good point about Murphy’s Law.  However, I’m not sure that removing power to the drivers is the right approach either.  It may depend on what kind of drivers you are using but the Gecko manual specifically says:

 

CAUTION! Never put a switch on the DC side of the power supply! This will damage, if not destroy, your drive.”

 

This may not apply to all drivers but I think I toasted a China driver this week doing just that.  It might be better to connect the second set of contacts to the enable/disable (again depending on what kind of driver you have) on the driver to avoid causing any damage.  What are your thoughts?

 

Would you be willing to post your C code that monitors the E-stop and flags the Kflop?

 

Jack

 

 

From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com]
Sent: Friday, August 15, 2014 1:55 PM
To: DynoMotion@yahoogroups.com
Subject: Re: [DynoMotion] Re: KStep Setup

 

 

Hi,

 

since Tom would rather not comment on possible e-stop options, I'll mention how I implemented one on a small machine last week using a KStep.

 

I used a double pole relay, controlled via the E-Stop button(s) circuit, which is a NC (Normally Closed) type setup. This way, the circuit is as fail safe as possible, as any breakage of the circuit will prevent the system from exiting an E-stop state.

One set of contacts in the relay is used to control the main power supply for the stepper motors, and the other set I connected to one of the KStep Opto Ins. This way, the KFlop is notified an E-stop has occured, and regardless of what the KFlop is programmed to do about the E-stop, power is removed to the motors.

 

My reasoning for this, is an E-stop should never rely on software. When programmed correctly, in an ideal world, the KFlop should always respond how you want it to an E-stop, however glitchs in software/hardware can happen, so by removing power, you guarantee things will stop.

Tthere are applications where removing power is the last thing you want to do, however I doubt that will apply to anything being driven by a KStep!

 

I also have a lathe using a KFlop+Kanalog, which has a more advanced E-stop setup, however it still ultimately removes the power to the servo and spindle drives.

 

Moray

 

On Thu, Aug 14, 2014 at 9:59 PM, Tom Kerekes tk@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:

 

Hi Scott,

 

There are many ways to do EStop that is up to you.  I'm hesitant to to make any specific recommendations.

 

The enable pin is connected to KFLOP IO45 on JP7 and is normally used in software to enable/disable the KSTEP motor currents.  You have the option to not enable IO45 and override enable with an external signal like you describe.

 

Other options are to have your EStop switch off the Motor Supply.

 

Or feed the EStop into an input to KFLOP (ie KSTEP 24V Opto inputs) and have a "watchdog" type of program running in KFLOP to detect EStop and handle it as you wish (disable KSTEP, Disable axes, apply brakes, etc...) - but this involves software in KFLOP which may be less reliable.

 

HTH

Regards

TK 

 


Sent: Thursday, August 14, 2014 12:39 PM
Subject: [DynoMotion] Re: KStep Setup

 

 

Thanks Tom! I am working on getting this set up. Is there a wiring diagram for the E-Stop circuit? Would I be right in assuming that it would use the "Enable" pin on the KStep J6 connector? Or is it better to do this through the Kflop board?

 

 

 

Group: DynoMotion Message: 9988 From: scott.littlecnc Date: 8/15/2014
Subject: Re: KStep Setup
Thanks for all of the excellent answers. I will experiment with the E-Stop to cut the AC Power to the 48V DC supply. If it takes a moment to power down I may have to look deeper.
Group: DynoMotion Message: 9998 From: scott.littlecnc Date: 8/18/2014
Subject: Re: KStep Setup
Tom,
I was able to get to where I can move a motor using the "Step and Response" Screen. I have been reading through the help in the Config screen and think that I got it. 
I think I have the limit switches set up correctly, but would like to see about homing. How do I set the axis to home? 
Thanks!
Scott
Group: DynoMotion Message: 9999 From: Tom Kerekes Date: 8/18/2014
Subject: Re: KStep Setup
Hi Scott,

To do homing a C Program is required.  We include a Function where all you should need is to change the calling parameters.  See:

C:\KMotion433cc\C Programs\SimpleHomeIndexFunctionTest.c

Which includes and makes use of:

C:\KMotion433cc\C Programs\SimpleHomeIndexFunction.c

To test run it from an unused Thread in KMotion.exe | C Programs.  After the program works to your satisfaction assign it to a User Button in KMotionCNC.

HTH
Regards
TK



From: "scott.littlecnc@... [DynoMotion]" <DynoMotion@yahoogroups.com>
To: DynoMotion@yahoogroups.com
Sent: Monday, August 18, 2014 2:20 PM
Subject: Re: [DynoMotion] KStep Setup

 
Tom,
I was able to get to where I can move a motor using the "Step and Response" Screen. I have been reading through the help in the Config screen and think that I got it. 
I think I have the limit switches set up correctly, but would like to see about homing. How do I set the axis to home? 
Thanks!
Scott


Group: DynoMotion Message: 10005 From: scott.littlecnc Date: 8/19/2014
Subject: Re: KStep Setup
Excellent, Thanks!
Group: DynoMotion Message: 10115 From: cnc_machines Date: 9/4/2014
Subject: KStep Setup
Good Morning,

I am new to Kflop and Kstep and am trying to get things set up. Hoping to get some help with basic understanding.

1. Two Ball screw Axis run by K-step with encoders
  • I went to "Configuration" and loaded the KStep Axis. How do I configure the 400 count per revolution encoders?
2. I have one rotary axis with an encoder NOT directly mounted to the motor
  • How do I configure a rotary axis with Kstep?
  • How do I configure the encoder when it is not on the motor? there is a 4:1 ration between the motor and the encoder
Group: DynoMotion Message: 10120 From: Tom Kerekes Date: 9/4/2014
Subject: Re: KStep Setup
Hi,

I'm not sure I understand entirely what you are trying to do.  The first step would be to get your axes to move open loop.  Have you done this?

To run closed loop adjust the InputGain0 parameter to match the Encoder Resolution to the Step Resolution.

In #1 KSTEP generates 3200 steps per rev.  If your Encoder only generates 400 counts/rev you will need a Gain of 8.0 to match them

In  #2 you haven't provided enough information.

You can verify gains are properly matched by making moves on the Step Response Screen.  The Commanded Steps (blue plot) and Measured Encoder Position (red plot) should closely match.

What application are you planning to use?  Within KMotionCNC | Tool Setup | Trajectory planner the Axis Resolutions and Types can be configured.

HTH
Regards
TK

Group: DynoMotion Message: 10123 From: cnc_machines Date: 9/4/2014
Subject: Re: KStep Setup
Tom,

Thanks for the help. I am making a machine with two ball screw axis, and one rotary axis. I have all three motors hooked up and am running them in open loop - I am still waiting on my encoders and will follow your suggestions once they arrive.

My apologies for not explaining my rotary axis very well. I am wanting to have it set up to move in degrees according from a g code program. I was wondering how to configure it to move in degrees rather than linear motion.

Scott
Group: DynoMotion Message: 10129 From: Tom Kerekes Date: 9/4/2014
Subject: Re: KStep Setup
Hi Scott,

Within KMotionCNC Tool Setup Screen there is an option to select Degrees mode for any of the A B C Axes.  See:


There is also an option to supply a radius so that combined motion feedrates can be approximated.  See this Video Tutorial (Flash is required)


HTH
Regards
TK



From: "cnc_machines@... [DynoMotion]" <DynoMotion@yahoogroups.com>
To: DynoMotion@yahoogroups.com
Sent: Thursday, September 4, 2014 12:14 PM
Subject: Re: [DynoMotion] KStep Setup

 
Tom,

Thanks for the help. I am making a machine with two ball screw axis, and one rotary axis. I have all three motors hooked up and am running them in open loop - I am still waiting on my encoders and will follow your suggestions once they arrive.

My apologies for not explaining my rotary axis very well. I am wanting to have it set up to move in degrees according from a g code program. I was wondering how to configure it to move in degrees rather than linear motion.

Scott


Group: DynoMotion Message: 10142 From: cnc_machines Date: 9/8/2014
Subject: Re: KStep Setup
Tom,

I am a bit confused about the difference between the Step response screen settings for Velocity, Acceleration, and Jerk. Is this only for testing purposes? Are the final parameters to set up velocity on an axis in the tool setup screen or in the step response screen?

Also a question on the trajectory planner screen. The Axis Counts per inch - I am using the K-Step. This is a 16X micro stepping drive? So for a standard 200 CT/REV motor it would be 200*16? I have a 10mm lead ball screw. So the number would be.

IN per REV = 10/25.4 = .3937
Revolutions Per Inch = 1/.3937 = 2.540
Counts Per Revolution = 200*16 = 3200
Counts Per Inch = 3200*2.54 = 8128

Thanks again for the help.

Scott
Group: DynoMotion Message: 10145 From: Moray Cuthill Date: 9/8/2014
Subject: Re: KStep Setup
Scott,
 
your figures look good to me.
I've just replied to your other post, which should hopefully help you with the basic setup.
 
Moray

On Mon, Sep 8, 2014 at 9:33 PM, cnc_machines@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

Tom,

I am a bit confused about the difference between the Step response screen settings for Velocity, Acceleration, and Jerk. Is this only for testing purposes? Are the final parameters to set up velocity on an axis in the tool setup screen or in the step response screen?

Also a question on the trajectory planner screen. The Axis Counts per inch - I am using the K-Step. This is a 16X micro stepping drive? So for a standard 200 CT/REV motor it would be 200*16? I have a 10mm lead ball screw. So the number would be.

IN per REV = 10/25.4 = .3937
Revolutions Per Inch = 1/.3937 = 2.540
Counts Per Revolution = 200*16 = 3200
Counts Per Inch = 3200*2.54 = 8128

Thanks again for the help.

Scott


Group: DynoMotion Message: 10147 From: Tom Kerekes Date: 9/8/2014
Subject: Re: KStep Setup
Hi Scott,

Actually both the Velocity, Acceleration, and Jerk in the Step Response Screen (KFLOP parameter settings) and the Acceleration and Velocity in the KMotionCNC | Tool Setup | Trajectory Planner | Axis Parameters are both used for different things.  

The KFLOP parameters are used for 3rd order motions.   These include things like:  Jogging, Homing, and GCode Rapids (G0).  The units in KFLOP are in counts or steps.

The KMotionCNC parameters are used for 2nd order (infinite Jerk) coordinated motion paths.  These are GCode G1,G2,G3 continuous paths.  The units are in Inches (or in some cases degrees).

You should test and find optimal settings for both types of moves using the Step Response Screen.  The Step Response Screen always performs 3rd order motion but 2nd order motion can be simulated by temporarily setting the Jerk to a huge value (1000X the acceleration value).  In general reducing the Jerk value will result in longer times to perform motions, but often the improved smoothness will permit higher maximum accelerations and velocities to be used resulting in overall shorter motion times.

I believe your math is correct.
HTH
Regards
TK   


From: "cnc_machines@... [DynoMotion]" <DynoMotion@yahoogroups.com>
To: DynoMotion@yahoogroups.com
Sent: Monday, September 8, 2014 1:33 PM
Subject: Re: [DynoMotion] KStep Setup

 
Tom,

I am a bit confused about the difference between the Step response screen settings for Velocity, Acceleration, and Jerk. Is this only for testing purposes? Are the final parameters to set up velocity on an axis in the tool setup screen or in the step response screen?

Also a question on the trajectory planner screen. The Axis Counts per inch - I am using the K-Step. This is a 16X micro stepping drive? So for a standard 200 CT/REV motor it would be 200*16? I have a 10mm lead ball screw. So the number would be.

IN per REV = 10/25.4 = .3937
Revolutions Per Inch = 1/.3937 = 2.540
Counts Per Revolution = 200*16 = 3200
Counts Per Inch = 3200*2.54 = 8128

Thanks again for the help.

Scott


Group: DynoMotion Message: 10148 From: cnc_machines Date: 9/8/2014
Subject: Re: KStep Setup
Tom,

So if I understand correctly when a rapid movement is made, it will be done at the velocity, acceleration, and jerk indicated on the step response screen.

When it comes to jogging I see that there is a parameter in the trajectory planner screen. Does the Kflop look for the max velocity there and then uses the jerk and acceleration from the step response screen? Is this also the case with homing?

Thanks,

Scott
Group: DynoMotion Message: 10152 From: Tom Kerekes Date: 9/8/2014
Subject: Re: KStep Setup
Hi Scott,

Yes, yes, and yes.

Regards
TK

Group: DynoMotion Message: 10155 From: cnc_machines Date: 9/9/2014
Subject: Re: KStep Setup
Tom,

Curious why Jerk wouldn't be considered in the G-Code programs as well. Is the math to coordinate motion on multiple axis too difficult if Jerk is included? Seems like it would give a performance boost if it were possible.

Scott
Group: DynoMotion Message: 10161 From: Moray Cuthill Date: 9/9/2014
Subject: Re: KStep Setup
It's all to do with complexity.
 
If you search back through the Mach group archives for Art Fennerty's (the original person behind Mach incase you don't know) post on what's required for a S-curve / 6th order trajectory planner, and you'll quickly understand why!
 
Actually, I felt like reading it again, so here's the link - https://groups.yahoo.com/neo/groups/mach1mach2cnc/conversations/topics/133727
It's quite interesting to read, and shows just how difficult it is to achieve efficiently.
 
Moray

On Tue, Sep 9, 2014 at 3:33 PM, cnc_machines@... [DynoMotion] <DynoMotion@yahoogroups.com> wrote:
 

Tom,

Curious why Jerk wouldn't be considered in the G-Code programs as well. Is the math to coordinate motion on multiple axis too difficult if Jerk is included? Seems like it would give a performance boost if it were possible.

Scott